package com.sdk4.jinritemai.model.request;

import com.sdk4.jinritemai.DoudianRequest;
import com.sdk4.jinritemai.model.response.DoudianOrderBatchDecryptResponse;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author huangji
 * @date 2021/7/27 9:46
 * 解密
 */
@Getter
@Setter
public class DoudianOrderBatchDecryptRequest implements DoudianRequest<DoudianOrderBatchDecryptResponse> {

    private final String method = "order.batchDecrypt";

    /**
     * 待解密的密文列表，每次调用不超过50条
     */
    private List<CipherInfos> cipher_infos;


    @Getter
    @Setter
    public static class CipherInfos {
        /**
         * 业务标识，value为抖音订单号
         */
        private String auth_id;
        /**
         * 待解密密文，具体内容参考[数据安全加密对接文档](https://op.jinritemai.com/docs/guide-docs/56/589)
         */
        private String cipher_text;

    }


    @Override
    public Class<DoudianOrderBatchDecryptResponse> getResponseClass() {
        return DoudianOrderBatchDecryptResponse.class;
    }
}
